# -*- coding: utf-8 -*-

"""
DateTime   : 2021/04/13 9:16
Author     : ZhangYafei
Description: 
"""
from crawler.douban import DoubanCralwer
from crawler.maoyan import MaoyanSpider

def start_spider():
    print('电影信息来源：1. 豆瓣电影(https://movie.douban.com/j/search_subjects) 2. 猫眼电影Top(https://maoyan.com/board/4)')
    choice = input('请选择电影信息来源 >> ')
    if choice == '1':
        crawler = DoubanCralwer()
    elif choice == '2':
        crawler = MaoyanSpider()
    else:
        raise Exception('输入的电影信息来源不正确')
    crawler.run()


if __name__ == '__main__':
    start_spider()
